package com.GroupSix.entity;

import com.GroupSix.tool.ArrayIntegerTypeHandler;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("class_score")
public class ClassScoreEntity {

    @TableId(type = IdType.AUTO)
    private Long id;

    //班级名称
    private Integer className;

    //近代史考试学生
    @TableField(value = "course1_student", typeHandler = ArrayIntegerTypeHandler.class)
    private Integer[] course1Student;

    //近代史成绩单
    @TableField(value = "course1_score", typeHandler = ArrayIntegerTypeHandler.class)
    private Integer[] course1Score;

    //近代史课程id
    private Integer course1Id;

    //近代史平均分
    private Double course1AverageScore;

    //近代史考试数量
    private Integer course1Num;

    //高数考试学生
    @TableField(value = "course2_student", typeHandler = ArrayIntegerTypeHandler.class)
    private Integer[] course2Student;

    //高数成绩单
    @TableField(value = "course2_score", typeHandler = ArrayIntegerTypeHandler.class)
    private Integer[] course2Score;

    //高数课程id
    private Integer course2Id;

    //高数平均分
    private Double course2AverageScore;

    //高数考试数量
    private Integer course2Num;

    //Java考试学生
    @TableField(value = "course3_student", typeHandler = ArrayIntegerTypeHandler.class)
    private Integer[] course3Student;

    //Java成绩单
    @TableField(value = "course3_score", typeHandler = ArrayIntegerTypeHandler.class)
    private Integer[] course3Score;

    //Java课程id
    private Integer course3Id;

    //Java平均分
    private Double course3AverageScore;

    //Java考试数量
    private Integer course3Num;

    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    //更新时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

}
